/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package renders;

import java.awt.Component;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author root
 */
public class TipoFeriadoRender extends DefaultListCellRenderer implements TableCellRenderer {
    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        if (value != null){
            switch ((char) table.getValueAt(row, column)) {
                case 'N':
                    this.setText("Nacional");
                    break;
                case 'M':
                    this.setText("Municipal");
                    break;
                case 'P':
                    this.setText("Provincial");
                    break;
            }
        }
        return this;
    }
}